package com.android.base.entity;

import android.app.Application;

/**
 * 手机配置实例类
 * Created by Administrator on 2016/12/9.
 */

public class AppInfo {
    //application下上文
    private Application instance;
    // 系统版本
    private String systemVersion;
    /**
     * 屏幕参数
     */
    private float ScreenDensity = 0;
    private int ScreenWidth = 480;
    private int ScreenHeight = 800;

    public AppInfo(){

    }
    public void init(Application instance){
        this.instance = instance;
        //初始化屏幕变量
        new ScreenManager();
        //初始化配置信息
        new DebugManager();
    }

    public String getSystemVersion() {
        return systemVersion;
    }

    public void setSystemVersion(String systemVersion) {
        this.systemVersion = systemVersion;
    }

    public float getScreenDensity() {
        return ScreenDensity;
    }

    public void setScreenDensity(float screenDensity) {
        ScreenDensity = screenDensity;
    }

    public int getScreenWidth() {
        return ScreenWidth;
    }

    public void setScreenWidth(int screenWidth) {
        ScreenWidth = screenWidth;
    }

    public int getScreenHeight() {
        return ScreenHeight;
    }

    public void setScreenHeight(int screenHeight) {
        ScreenHeight = screenHeight;
    }

    public Application getApplication() {
        return instance;
    }

    public void setApplication(Application instance) {
        this.instance = instance;
    }

    /**
     * 检查是否存在sd卡
     */
    private boolean isExistSDCard() {
        return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
    }
}
